package com.javafive;

import java.io.*;

public class Demo9 {
    public static void main(String[] args) throws Exception {
        File file=new File("E:\\webWork\\javaKh62Demo\\src\\com\\javafive\\txt\\1.txt");
        InputStream inputStream= new FileInputStream(file);
        Reader reader=new InputStreamReader(inputStream,"UTF-8");
        char[] chars = new char[inputStream.available()];
        int count=-1;
        while ((count=reader.read(chars))!=-1){
        }
        for (int i = 0; i <chars.length ; i++) {
                System.out.println(chars[i]);
        }
        reader.close();
    }
}
